﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                   assembly="DataStore"
                   namespace="DataStore.Domain">
  <class name="Company" table="Company">
    <id name="Id" column="CompanyId" type="Guid">
      <generator class="guid" />
    </id>
    <property name="Name" type ="String" />
    <property name="Founded" type="DateTime" />
    <property name="Industry" type="String" />
    <many-to-one name="Type" column="TypeRef" class="CompanyType" />
    <set name="Employees">
      <key column="Company" />
      <one-to-many class="Person"/>
    </set>
    <set name="Links">
      <key column="Owner" />
      <one-to-many class="Link"/>
    </set>
    <set name="Addresses">
      <key column="Owner" />
      <one-to-many class="Address"/>
    </set>
  </class>
</hibernate-mapping>